<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>解决1px</title>
    <style>
      .border-1px {
        position: relative;
      }

      .border-1px::after {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        border: 1px solid #000;
        transform: scale(0.5);
        transform-origin: 0 0;
      }
    </style>
  </head>
  <body>
    <div class="border-1px"></div>
  </body>
</html>
